#include "cdfpropertyfield.h"

cdfpropertyfield::cdfpropertyfield(QString triggerId, dep *myDep)
{
    count++;
    this->setIdState(count);
    this->triggerId = triggerId;
    this->myDep = myDep;
    /*this->horizontalLayout_7 = new QHBoxLayout();
    this->lineEdit_7 = new QLineEdit(layoutWidget);
    this->label_6 = new QLabel(layoutWidget);*/
}

void cdfpropertyfield::dep_accept()
{
    this->myDep->cdfBlockButtonClicked();
}

void cdfpropertyfield::createField(blockproperty *block1)
{
    /*this->horizontalLayout_7 = new QHBoxLayout();
    this->lineEdit_7 = new QLineEdit(layoutWidget);
    this->label_6 = new QLabel(layoutWidget);*/
    horizontalLayout_7->setObjectName(QString::fromUtf8("horizontalLayout_7"));
    label_6->setObjectName(QString::fromUtf8("label_6"));
    label_6->setText("State: " + QString::number(this->idState, 10));

    horizontalLayout_7->addWidget(label_6);
    //lineEdit_7->setObjectName(QString::fromUtf8("lineEdit_7"));
    comboBox_1->setObjectName(QString::fromUtf8("comboBox_1"));
    comboBox_1->addItem("");
    comboBox_1->addItem("Active");
    comboBox_1->addItem("Stand By");
    comboBox_1->addItem("Failed");


    horizontalLayout_7->addWidget(comboBox_1);

    pushButton_5->setObjectName(QString::fromUtf8("pushButton_5"));
    pushButton_5->setText("Set C.D.F. for node" + this->triggerId);

    horizontalLayout_7->addWidget(pushButton_5);

    //connect(pushButton_3,SIGNAL(clicked()), this, SLOT(dep_accept()));

    //blockproperty::connect(pushButton_3,SIGNAL(clicked()), this, SLOT(dep_accept()));

    //horizontalLayout_7->addWidget(lineEdit_7);

}

dep *cdfpropertyfield::getMyDep()
{
    return this->myDep;
}

QHBoxLayout *cdfpropertyfield::getHorizontalLayout()
{
    return this->horizontalLayout_7;
}

/*QLineEdit *cdfpropertyfield::getLineEdit()
{
    return this->lineEdit_7;
}*/

QLabel *cdfpropertyfield::getLabel()
{
    return this->label_6;
}

QComboBox *cdfpropertyfield::getComboBox()
{
    return this->comboBox_1;
}

QPushButton *cdfpropertyfield::getPushButton()
{
    return this->pushButton_5;
}

QString cdfpropertyfield::getTriggerId()
{
    return this->triggerId;
}

void cdfpropertyfield::setHorizontalLayout(QHBoxLayout *value)
{
    this->horizontalLayout_7 = value;
}

/*void cdfpropertyfield::setLineEdit(QLineEdit *value)
{
    this->lineEdit_7 = value;
}*/

void cdfpropertyfield::setComboBox(QComboBox *value)
{
    this->comboBox_1 = value;
}

void cdfpropertyfield::setPushButton(QPushButton *value)
{
    this->pushButton_5 = value;
}

void cdfpropertyfield::setLabel(QLabel *value)
{
    this->label_6 = value;
}

void cdfpropertyfield::setIdState(int value)
{
    this->idState = value;
}

int cdfpropertyfield::getIdState()
{
    return this->idState;
}
